/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package org.abc;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;

/**
 * <p>Project: jse2303 - LocalDateTimeDemo
 * <p>Powered by webrx On 2023-07-10 11:41:19
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class LocalDateTimeDemo {
    public static void main(String[] args) {
        //LocalDateTime = LocalDate日期 + LocalTime时间 相当于java.util.Date java.util.Calendar
        LocalDateTime now = LocalDateTime.now();
        System.out.printf("%tF %<tT %n", now);

        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH时:mm分ss秒 EEEE MMMM");
        System.out.println(df.format(now));

        //格式化 20230710114354  20230710114453.jpg
        DateTimeFormatter df2 = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
        System.out.println(df2.format(now));

        Locale.setDefault(Locale.CHINA);
        System.out.printf("%tA%n", System.currentTimeMillis());

    }
}
